package com.java.tutorials.jdk7.paths;

import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * Created by xuzhike on 2016/1/27.
 * http://www.java2s.com/Code/Java/JDK-7/Getrealpathwithoutfollowinglinks.htm
 * Get real path without following links
 */
public class Getrealpathwithoutfollowinglinks {
    public static void main(String[] args) throws Exception {
        Path path = Paths.get("users.txt");

        System.out.println("Real path: " + path.toRealPath(LinkOption.NOFOLLOW_LINKS));
    }
}
